<?php

namespace Models\Api;

class DsCustomApi extends \Models\AbstractModel
{

    /**
     *
     * @var integer
     * @Primary
     * @Identity
     * @Column(type="integer", length=10, nullable=false)
     */
    protected $id;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    protected $name;

    /**
     *
     * @var string
     * @Column(type="string", length=30, nullable=true)
     */
    protected $classify;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    protected $scene;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    protected $route;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    protected $server_status;

    /**
     *
     * @var integer
     * @Column(type="integer", length=10, nullable=true)
     */
    protected $database_id;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    protected $sql;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    protected $success_return;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    protected $error_return;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    protected $api_status;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    protected $input_parameter;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    protected $output_parameter;

    /**
     *
     * @var string
     * @Column(type="string", length=30, nullable=true)
     */
    protected $request_method;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    protected $create_time;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    protected $update_time;

    /**
     * Method to set the value of field id
     *
     * @param integer $id
     * @return $this
     */
    public function setId($id)
    {
        $this->id = $id;

        return $this;
    }

    /**
     * Method to set the value of field name
     *
     * @param string $name
     * @return $this
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Method to set the value of field classify
     *
     * @param string $classify
     * @return $this
     */
    public function setClassify($classify)
    {
        $this->classify = $classify;

        return $this;
    }

    /**
     * Method to set the value of field scene
     *
     * @param string $scene
     * @return $this
     */
    public function setScene($scene)
    {
        $this->scene = $scene;

        return $this;
    }

    /**
     * Method to set the value of field route
     *
     * @param string $route
     * @return $this
     */
    public function setRoute($route)
    {
        $this->route = $route;

        return $this;
    }

    /**
     * Method to set the value of field server_status
     *
     * @param string $server_status
     * @return $this
     */
    public function setServerStatus($server_status)
    {
        $this->server_status = $server_status;

        return $this;
    }

    /**
     * Method to set the value of field database_id
     *
     * @param integer $database_id
     * @return $this
     */
    public function setDatabaseId($database_id)
    {
        $this->database_id = $database_id;

        return $this;
    }

    /**
     * Method to set the value of field sql
     *
     * @param string $sql
     * @return $this
     */
    public function setSql($sql)
    {
        $this->sql = $sql;

        return $this;
    }

    /**
     * Method to set the value of field success_return
     *
     * @param string $success_return
     * @return $this
     */
    public function setSuccessReturn($success_return)
    {
        $this->success_return = $success_return;

        return $this;
    }

    /**
     * Method to set the value of field error_return
     *
     * @param string $error_return
     * @return $this
     */
    public function setErrorReturn($error_return)
    {
        $this->error_return = $error_return;

        return $this;
    }

    /**
     * Method to set the value of field api_status
     *
     * @param string $api_status
     * @return $this
     */
    public function setApiStatus($api_status)
    {
        $this->api_status = $api_status;

        return $this;
    }

    /**
     * Method to set the value of field input_parameter
     *
     * @param string $input_parameter
     * @return $this
     */
    public function setInputParameter($input_parameter)
    {
        $this->input_parameter = $input_parameter;

        return $this;
    }

    /**
     * Method to set the value of field output_parameter
     *
     * @param string $output_parameter
     * @return $this
     */
    public function setOutputParameter($output_parameter)
    {
        $this->output_parameter = $output_parameter;

        return $this;
    }

    /**
     * Method to set the value of field request_method
     *
     * @param string $request_method
     * @return $this
     */
    public function setRequestMethod($request_method)
    {
        $this->request_method = $request_method;

        return $this;
    }

    /**
     * Method to set the value of field create_time
     *
     * @param string $create_time
     * @return $this
     */
    public function setCreateTime($create_time)
    {
        $this->create_time = $create_time;

        return $this;
    }

    /**
     * Method to set the value of field update_time
     *
     * @param string $update_time
     * @return $this
     */
    public function setUpdateTime($update_time)
    {
        $this->update_time = $update_time;

        return $this;
    }

    /**
     * Returns the value of field id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Returns the value of field name
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Returns the value of field classify
     *
     * @return string
     */
    public function getClassify()
    {
        return $this->classify;
    }

    /**
     * Returns the value of field scene
     *
     * @return string
     */
    public function getScene()
    {
        return $this->scene;
    }

    /**
     * Returns the value of field route
     *
     * @return string
     */
    public function getRoute()
    {
        return $this->route;
    }

    /**
     * Returns the value of field server_status
     *
     * @return string
     */
    public function getServerStatus()
    {
        return $this->server_status;
    }

    /**
     * Returns the value of field database_id
     *
     * @return integer
     */
    public function getDatabaseId()
    {
        return $this->database_id;
    }

    /**
     * Returns the value of field sql
     *
     * @return string
     */
    public function getSql()
    {
        return $this->sql;
    }

    /**
     * Returns the value of field success_return
     *
     * @return string
     */
    public function getSuccessReturn()
    {
        return $this->success_return;
    }

    /**
     * Returns the value of field error_return
     *
     * @return string
     */
    public function getErrorReturn()
    {
        return $this->error_return;
    }

    /**
     * Returns the value of field api_status
     *
     * @return string
     */
    public function getApiStatus()
    {
        return $this->api_status;
    }

    /**
     * Returns the value of field input_parameter
     *
     * @return string
     */
    public function getInputParameter()
    {
        return $this->input_parameter;
    }

    /**
     * Returns the value of field output_parameter
     *
     * @return string
     */
    public function getOutputParameter()
    {
        return $this->output_parameter;
    }

    /**
     * Returns the value of field request_method
     *
     * @return string
     */
    public function getRequestMethod()
    {
        return $this->request_method;
    }

    /**
     * Returns the value of field create_time
     *
     * @return string
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    /**
     * Returns the value of field update_time
     *
     * @return string
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    /**
     * Initialize method for model.
     */
    public function initialize()
    {
        $this->setSchema("dev_bigdata");
    }

    /**
     * Returns table name mapped in the model.
     *
     * @return string
     */
    public function getSource()
    {
        return 'ds_custom_api';
    }

    /**
     * Allows to query a set of records that match the specified conditions
     *
     * @param mixed $parameters
     * @return DsCustomApi[]|DsCustomApi
     */
    public static function find($parameters = null)
    {
        return parent::find($parameters);
    }

    /**
     * Allows to query the first record that match the specified conditions
     *
     * @param mixed $parameters
     * @return DsCustomApi
     */
    public static function findFirst($parameters = null)
    {
        return parent::findFirst($parameters);
    }

}
